Conversation
|
Hey @map-g, thanks for opening a pull request for this, always happy about contributions 👍 It makes sense to add more control over the Furthermore, the pull request appears to be in good shape. However, I believe we should include some additional tests to ensure that this new feature works as expected. I also talked with @clue as we have plans to change a few things about the Still trying to figure out if we should use your suggestion as a transitional solution until we tagged the first version and apply our planned changes to the |
|
Hi Simon, |
|
@map-g As you may already know, we're currently working on a first version for Framework X which should go live tomorrow, see https://twitter.com/x_framework/status/1762499173830778907. In preparation for this release, we've been brainstorming a ton of new features, including the possibility of supporting JSON responses. This is definitely on our roadmap and will probably be a feature addition in the near future! While it might not make it into tomorrow's version, we're confident it will be included in an upcoming release. As there will be some refactorings and additions to the whole handler structure anyway, I think it's best we close this for now as we also expect to pick this up in the near future. We can't say for sure what the new handlers will look like as of today, so in my opinion it's best to focus on that first and then revisit this topic afterwards 👍 |
In order to response with individual error messages and / or formats (e.g. JSON), we are able to put an ErrorHandler to the container (see #175). But the individual ErrorHandler is not used in the RouteHandler. This PR allows to pass an ErrorHandler to the RouteHandler, and the App passes the selected ErrorHandler to the RouteHandler. This will allow to response with individual error messages and / or formats in case a route is not found.